package com.tuling.mall.user.feign;

import com.tuling.common.utils.R;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

/**
 * OrderFeignServiceFallbackFactory
 *
 * @author WangPanYong
 * @since 2024/12/12
 */
@Component
public class OrderFeignServiceFallbackFactory implements FallbackFactory<OrderFeignService> {
    @Override
    public OrderFeignService create(Throwable cause) {
        return userId -> R.error(cause.getMessage());
    }

}
